package org.dynobjects.core;

import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import org.dynobjects.core.xml.Model;


/**
 * Carica in memoria il file xml con i dati riguardanti i modelli
 * @author epelli
 *
 */
public  class DefaultResourceLoader implements ResourceLoader{

	private static final long serialVersionUID = -5074329598963092376L;
	

	public ResourceContainer loadResources(List resources) throws Exception {
		ResourceContainer resourceContainer = new ResourceContainer();
		ResourceResolver resolver = new ResourceResolver();
		for (Iterator iter = resources.iterator(); iter.hasNext();) {
			String resourcePath = (String) iter.next();
			InputStream in = resolver.resolve(resourcePath);
			resourceContainer.put(resourcePath, in);
			
		}
		return resourceContainer;
	}


	

}
